// JavaScript Document
function validacao()
{
	d=document.escolhaForm;
	var texto = "";
	var erro = 0;
	
	if(d.doc.value == "")
	{
		erro = 1;
		texto = texto + "Escolha Algo!!</br>";
		document.getElementById('doc');
		
	
			
	}
	if(erro == 1)
	{
		fadeIn('erro');
		document.getElementById('erro').innerHTML = texto;
		return false;
	}

}
function fadeOut(id, time) {  
    fade(id, time, 100, 0);  
}  
  
function fadeIn(id, time) {  
    fade(id, time, 0, 100);  
}  
  
function fade(id, time, ini, fin) {  
    var target = document.getElementById(id);  
    var alpha = ini;  
    var inc;  
    if (fin >= ini) {   
        inc = 2;   
    } else {  
        inc = -2;  
    }  
    timer = (time * 1000) / 50;  
    var i = setInterval(  
        function() {  
            if ((inc > 0 && alpha >= fin) || (inc < 0 && alpha <= fin)) {  
                clearInterval(i);  
            }  
            setAlpha(target, alpha);  
            alpha += inc;  
        }, timer);  
}  
  
function setAlpha(target, alpha) {  
    target.style.filter = "alpha(opacity="+ alpha +")";  
    target.style.opacity = alpha/100;  
}  
